<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<h:body>
	
	<header class="header">
		<f:metadata>
			<f:event type="preRenderView" listener="#{usuarioMB.verificaSessao}" />
		</f:metadata>
		<div class="container">
			<h:graphicImage
				rendered="#{principalMB.temFotoPadrao}" 
				library="assets/images" 
				name="avatar.jpg"
				styleClass="profile-image img-responsive pull-left" 
				style="border-radius: 50%; width: 170px; heigth: 170px;"
				alt="Avatar" />
		
			<h:graphicImage 
				rendered="#{principalMB.temFotoCarregada}"
				styleClass="profile-image img-responsive pull-left" 
				value="/images/usuario?id=#{principalMB.usuario.id}"
				alt="#{usuarioMB.usuario.nome}" 
				style="border-radius: 50%; width: 170px; heigth: 170px;" />
				
			<div class="profile-content pull-left">
				<h1 class="name">Biblioteca Pessoal</h1>
				<h2 class="desc">
					<h:outputText value="#{principalMB.usuario.nome}" />
				</h2>
				<ul class="social list-inline">
					<li><a href="#"><i class="fa fa-twitter"></i></a></li>
					<li><a href="#"><i class="fa fa-google-plus"></i></a></li>
					<li><a href="#"><i class="fa fa-github"></i></a></li>
					<li><a href="#"><i class="fa fa-facebook"></i></a></li>
					<li><a href="#"><i class="fa fa-bitbucket"></i></a></li>
					
				</ul>
			</div>
			<!--//profile-->
			<p:commandLink 
				styleClass="btn btn-cta-primary pull-right" 
				value="Home" 
				actionListener="#{principalMB.perfilUserLogado}"
				action="#{principalMB.paginaPrincipal}" />
			
		</div>
		<!--//container-->
	</header>
	<!--//header-->
</h:body>
</html>
